/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package patternmining;

import java.io.File;
import patternmining.model.construction.Source;
import patternmining.model.construction.bpsl.BpslFakeSource;
import patternmining.model.construction.bpsl.BpslFile;
import patternmining.model.construction.bpsl.BpslSource;
import patternmining.model.construction.java.JavaFakeSource;
import patternmining.model.graph.Graph;
import patternmining.model.graph.algorithm.DFS;

/**
 *
 * @author Holger
 */
public class Main {

    public static void main(String[] args){

        Source formulaSource = new BpslSource();
        BpslFile file = new BpslFile( new File("observer.bpsl") );
        formulaSource.includeFile( file );
        formulaSource.buildGraph();
        Graph formulaGraph = formulaSource.getGraph();

        System.out.println("Bpsl Formula Graph:\n" + formulaGraph.toString() );

        Source programSource = new JavaFakeSource();
        programSource.buildGraph();
        Graph programGraph = programSource.getGraph();

        System.out.println("\nJava Program Graph:\n" + programGraph.toString() );
        
        System.out.println("\n-------------------------------------------------\n");
        System.out.println("\nDFS Traversing of the formual graph:\n\n");
        DFS walk = new DFS(formulaGraph);
        walk.walkGraph();
        
    }

}
